import { sendRequest } from '@/http';

export function queryInstitutions(params: any) {
  return sendRequest({
    url: `/institution/queryInstitutions`,
    method: 'get',
    params,
  });
}

export function createInstitution(data: any) {
  return sendRequest({
    url: `/institution/createInstitution`,
    method: 'post',
    data,
  });
}

export function updateInstitution(data: any) {
  // /adapi/institution/updateInstitution
  return sendRequest({
    url: `/institution/updateInstitution`,
    method: 'post',
    data,
  });
}

export function disableInstitution(instId: string) {
  return sendRequest({
    url: `/institution/disableInstitution`,
    method: 'post',
    data: { instId },
  });
}

export function uploadInstitutionIcon(instId: string, data: any) {
  return sendRequest({
    url: `/institution/uploadInstitutionIcon`,
    method: 'post',
    params: { instId },
    data,
  });
}
